Xbasic

INET::FTPSendStringData Method

Syntax

.SendStringData as L (Data as C, TargetFile as C)

Arguments

DataCharacter

The data to send.

TargetFileCharacter

The target file name.

Returns

resultLogical

Returns .t. if the operation succeed. Otherwise, returns .f.. If an error occurred, the INET::FTP CallResult property will contain more information.

Description

Send a buffer of text data to the target file specified.

Example

dim ftp as INET::FTP
ftp.UserName   = "Fred"
ftp.Password   = "Secret"
ftp.EnableSSL  = .t.
ftp.Host       = "ftp.myserver.com"
ftp.UsePassive = .t.

if ftp.SendString("Data","target.csv") <> .t.
    ' error
    msg = ftp.callResult.error
    ...
end if